package org.bingo.security.core.validate.code.image;

import lombok.Data;
import org.bingo.security.core.validate.code.ValidateCode;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

/**
 * 图形验证码
 */
@Data
public class ImageCode extends ValidateCode {
    private static final long serialVersionUID = -7545089663937129832L;

    // 图片
    private BufferedImage image;

    public ImageCode(BufferedImage image, String code, int expireIn) {
        super(code, expireIn);
        this.image = image;
    }

    public ImageCode(BufferedImage image, String code, LocalDateTime expireTime) {
        super(code, expireTime);
        this.image = image;
    }
}
